<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">

        <!--
        Required with r2-navigator-kotlin
        Used to serve a publication's resources from the local HTTP server
        -->
        <domain includeSubdomains="false">127.0.0.1</domain>
        <domain includeSubdomains="false">localhost</domain>

        <!--
        Required with r2-lcp-kotlin
        The CRL is served from an HTTP server, so we need to explicitly allow clear-text traffic on
        this domain
        See https://github.com/readium/r2-lcp-kotlin/issues/59
        -->
        <domain includeSubdomains="false">crl.edrlab.telesec.de</domain>

        <!-- Publications from Feedbooks' catalog are downloaded through HTTP -->
        <domain includeSubdomains="true">feedbooks.com</domain>
        <domain includeSubdomains="true">feedbooks.net</domain>

        <!--
        Required for the Open Textbooks Catalog OPDS feed to load properly
        open.minitex.org is for the publications
        s3.amazonaws.com is for the cover images
        -->
        <domain includeSubdomains="false">open.minitex.org</domain>
        <domain includeSubdomains="false">s3.amazonaws.com</domain>

        <!--
        Required to stream the Flatland audiobook sample.
        -->
        <domain includeSubdomains="true">archive.org</domain>

    </domain-config>
</network-security-config>
